package com.pig4cloud.pig.village.api.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.pig4cloud.pig.village.api.enums.Gender;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;

/**
 * 村民表
 * @author limbray.li
 * @date 2021/6/12
 */
@Data
@TableName("organization_villager")
public class Villager {
	private static final long serialVersionUID = 1L;

	@TableId(value = "id", type = IdType.ASSIGN_ID)
	private Long id;
	@JsonIgnore
	private LocalDateTime createTime;
	@JsonIgnore
	private LocalDateTime updateTime;
	@JsonIgnore
	private String createBy;
	@JsonIgnore
	private String updateBy;
	@JsonIgnore
	@TableLogic(value = "0", delval = "1")
	private String delFlag;
	@JsonIgnore
	private Integer tenantId;

	@JsonIgnore
	@ApiModelProperty(value = "账号id",notes = "预留字段，不影响")
	private Integer userId;
	@ApiModelProperty(value = "名字")
	private String name;
	@ApiModelProperty(value = "户id")
	private Long familyId;
	@ApiModelProperty(value = "与户主关系")
	private String relation;
	@ApiModelProperty(value = "性别",notes ="0:女，1:男")
	private Gender gender;
	@ApiModelProperty(value = "身份证号")
	private String identityCard;
	@ApiModelProperty(value = "银行卡号")
//	private String creditCard;
	private String bankCard;
	@ApiModelProperty(value = "住址")
	private String address;
	@ApiModelProperty(value = "电话")
	private String phone;
	@JsonIgnore
	@ApiModelProperty(value = "死亡日期")
	@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	private LocalDateTime deadDate;
	@ApiModelProperty(value = "状态", notes = "是否死亡状态（0: 是，1: 否）")
	private Integer status;
	@ApiModelProperty(value = "出生日期")
	@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	private LocalDateTime birthDate;
	@ApiModelProperty(value = "外来家属", notes = "0: 是，1: 否")
	private Integer outsider;
	@ApiModelProperty(value = "党员", notes = "0: 是，1: 否")
	private Integer partyMember;

	@ApiModelProperty(value = "居住类型", notes = "0: 常住，1: 非常住, 2: 空挂")
	private Integer livingType;

	@ApiModelProperty(value = "户籍类型", notes = "0: 农民, 1:非农")
	private Integer registerType;
	@ApiModelProperty(value = "医保类型", notes = "0: 农保, 1:城保")
	private Integer medicalInsurance;
	@ApiModelProperty(value = "特殊家庭", notes = "0: 失独家庭, 1:特扶家庭")
	private Integer specialFamily;

	@ApiModelProperty(value = "分管片区", notes = "A,B,C,D")
	private Integer sectionOwner;
	@ApiModelProperty(value = "困难人群", notes = "0-低保，1-重残无业，2-一户多残，3-残疾人，4-五保户，5-低收入")
	private Integer hardGroup;
	@ApiModelProperty(value = "拥军拥属", notes = "0-抗美援朝军人，1-退伍军人，2-现役军人，3-伤残军人，4-重点优抚对象")
	private Integer army;

	@ApiModelProperty(value = "学校" , notes = "1：崇明区幼儿园；\n" +
			"2：崇明区小学；\n" +
			"3：崇明区初中；\n" +
			"4：崇明区高中；\n" +
			"5：市重点高中；\n" +
			"6：区重点高中；\n" +
			"7：普通高中；\n" +
			"8：985高校；\n" +
			"9：211高校；\n" +
			"10：普通高校；\n" +
			"11：专科；\n" +
			"12：专升本")
	private Integer school;

	@ApiModelProperty(value = "老队长", notes = "0: 是，1: 否")
	private Integer retiredCaptain;
	@ApiModelProperty(value = "老正副职", notes = "0: 是，1: 否")
	private Integer retiredPrincipal;
}